using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using BUS;
using DAO;
using DTO;

namespace TestQLKS
{
    [TestFixture]
    public class CLOAINGUOIDUNG
    {
        [Test]
        public void LayThongTinNguoiDungTestDAO()
        {
            int maNguoiDung = 7;
            CNGUOIDUNGDTO nguoiDung = new CNGUOIDUNGDTO();
           
            nguoiDung= CNGUOIDUNGDAO.LayThongTinNguoiDung(maNguoiDung);
            Assert.AreEqual(nguoiDung.TenDangNhap,"Giamdoc");
        }
        //
        [Test]
        public void LayDanhSachNguoiDungChuaDanhDauXoaTestDAO()
        {
            List<CNGUOIDUNGDTO> ds = new List<CNGUOIDUNGDTO>();
            ds= CNGUOIDUNGDAO.LayDanhSachNguoiDungChuaDanhDauXoa();
            Assert.AreEqual(5,ds.Count);
        }
        [Test]
        public void CapNhatThongTinNguoiDungTestDAO()
        {
            CNGUOIDUNGDTO nguoiDung = new CNGUOIDUNGDTO();
            nguoiDung.MaNguoiDung = 7;
            nguoiDung.TenNguoiDung = "Nguyenvanty";
            nguoiDung.MaLoaiNguoiDung = 5;
            CNGUOIDUNGDAO.CapNhatDayDuThongTinNguoiDung(nguoiDung);
            nguoiDung = CNGUOIDUNGDAO.LayThongTinNguoiDung(7);
            Assert.AreEqual(nguoiDung.TenNguoiDung, "Nguyenvanty");
        }
    }
}
